package com.itheima.quartz;

import java.util.Properties;

import javax.mail.Session;

public class MyQuartz {
		
	private String username;
	private String password;
	private String smtpServer;
	
	
	public String getUsername() {
		return username;
	}


	public void setUsername(String username) {
		this.username = username;
	}


	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}


	public String getSmtpServer() {
		return smtpServer;
	}


	public void setSmtpServer(String smtpServer) {
		this.smtpServer = smtpServer;
	}


	public void run()
	{
		final Properties mailProps = new Properties();
		mailProps.put("mail.smtp.host", this.getSmtpServer());
		mailProps.put("mail.smtp.auth", "true");
		mailProps.put("mail.username", this.getUsername());
		mailProps.put("mail.password", this.getPassword());
		
		Session mailSession = MailUtils.getMailSession(mailProps);
		MailUtils.sendMail("邮件标题", mailSession, mailProps, "邮件内容......","ApacheDeveloper@icloud.com");
		
	}
	
}
